package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.AttendanceMonthlyAddDTO;
import org.jsola.hr.dto.SubsidyProgAddDTO;
import org.jsola.hr.dto.SubsidyProgUpdateDTO;
import org.jsola.hr.query.SubsidyProgQuery;
import org.jsola.hr.vo.SubsidyProgListVO;
import org.jsola.hr.vo.SubsidyProgVO;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工津贴方案")
public interface ISubsidyProgControllerAPI {

    /**
     * 新增员工津贴方案
     * @param subsidyProgAddDTO 员工津贴方案新增实体
     * @return 员工津贴方案展示对象
     */
    @ApiOperation(value = "新增员工津贴方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgAddDTO", dataType = "SubsidyProgAddDTO", value = "新增员工津贴方案", paramType = "body")
    })
    Result<SubsidyProgVO> save(SubsidyProgAddDTO subsidyProgAddDTO);


    /**
     * 修改员工津贴方案
     * @param subsidyProgUpdateDTO 员工津贴方案
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工津贴方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgUpdateDTO", dataType = "SubsidyProgUpdateDTO", value = "修改员工津贴方案", paramType = "body")
    })
    Result<Integer> update(SubsidyProgUpdateDTO subsidyProgUpdateDTO);




    /**
     * 删除单个员工津贴方案，彻底删除
     * @param subsidyProgId 员工津贴方案id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工津贴方案，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgId", dataType = "String", value = "员工津贴方案id", paramType = "path")
    })
    Result<Integer> delete(String subsidyProgId);


    /**
     * 批量删除员工津贴方案，彻底删除
     * @param subsidyProgIds 员工津贴方案id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工津贴方案，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgIds", dataType = "String[]", value = "员工津贴方案id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] subsidyProgIds);


    /**
     * 根据员工津贴方案id查询员工津贴方案详情
     * @param subsidyProgId 员工津贴方案id
     * @return 员工津贴方案详情
     */
    @ApiOperation(value="根据员工津贴方案id查询员工津贴方案详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgId", dataType = "String", value = "员工津贴方案id", paramType = "path")
    })
    Result<SubsidyProgListVO> findById(String subsidyProgId);


    /**
     * 查询员工津贴方案
     * @param subsidyProgQuery 员工津贴方案查询参数
     * @return page
     */
    @ApiOperation(value="查询员工津贴方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgQuery", dataType = "SubsidyProgQuery", value = "员工津贴方案查询参数", paramType = "query")
    })
    Result<List<SubsidyProgListVO>> listAll(SubsidyProgQuery subsidyProgQuery);


     /**
     * 分页查询员工津贴方案
     * @param subsidyProgQuery 员工津贴方案查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工津贴方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgQuery", dataType = "SubsidyProgQuery", value = "员工津贴方案查询参数", paramType = "query")
    })
    Result<Page<SubsidyProgListVO>> page(SubsidyProgQuery subsidyProgQuery);

    /**
     * 新增员工津贴方案
     * @param subsidyProgAddDTO 员工津贴方案新增实体
     * @return 员工津贴方案展示对象
     */
    @ApiOperation(value = "新增员工津贴方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgAddDTO", dataType = "SubsidyProgAddDTO", value = "新增员工津贴方案", paramType = "body")
    })
    Result<SubsidyProgVO> addSubsidyProg(SubsidyProgAddDTO subsidyProgAddDTO);

    /**
     * 修改员工津贴方案
     * @param subsidyProgUpdateDTO 员工津贴方案
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工津贴方案")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "subsidyProgUpdateDTO", dataType = "SubsidyProgUpdateDTO", value = "修改员工津贴方案", paramType = "body")
    })
    Result<SubsidyProgVO> updateSubsidyProg(@Valid @RequestBody SubsidyProgUpdateDTO subsidyProgUpdateDTO);

    /**
     * 津贴计算更新月考勤统计
     * @param attendanceMonthlyAddDTO 员工考勤月统计参数
     * @return page
     */
    @ApiOperation(value="津贴计算更新月考勤统计")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "attendanceMonthlyAddDTO", dataType = "AttendanceMonthlyAddDTO", value = "员工考勤月统计参数", paramType = "body")
    })
    Result<Boolean> empSubsidyCount(@Valid @RequestBody AttendanceMonthlyAddDTO attendanceMonthlyAddDTO);


}

